examples: pin jni to 1.0.0 (1.0.1 breaks aarch64 Linux builds) - #243
Closed
FeodorFitsner wants to merge 1 commit into
Closed
examples: pin jni to 1.0.0 (1.0.1 breaks aarch64 Linux builds)#243FeodorFitsner wants to merge 1 commit into
FeodorFitsner wants to merge 1 commit into
Conversation
jni 1.0.1, published 2026-07-27T01:10Z, added global_jni_env.c, which passes a `va_list` where a `void *` is expected. On x86_64 va_list is an array type that decays to a pointer so it compiles; on aarch64 it is a struct, so it is a hard error and `flutter build linux` fails with 19 of them. Tracked upstream at dart-lang/native#3498. This surfaced on the release PR rather than as a scheduled failure because the examples depend on the serious_python packages by path: bumping their version invalidates the committed pubspec.lock, pub re-resolves the whole graph, and picks up the newest transitive versions. Any PR touching package versions after 2026-07-27T01:10Z would have hit it. jni itself arrives via path_provider -> path_provider_android -> jni_flutter -> jni. jni_flutter 1.0.1 declares `jni: ^1.0.0`, so 1.0.0 satisfies it -- the override narrows within the allowed range rather than overriding a constraint. Applied to all three examples; only bridge_example runs in CI, but the other two break identically for anyone building them on an ARM64 Linux host. The flask_example / run_example locks also pick up the current path-dependency version (4.0.0 -> 4.4.1); they were simply stale.
Contributor
Author
|
Folded into #242 as |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Unblocks CI.
Test Bridge example on Linux ARM64has been failing on every recent PR with 19 copies of:Root cause: upstream, not us
jni1.0.1 was published 2026-07-27T01:10:21Z. Last green ARM64 run was Jul 25 22:23; first failure Jul 27 15:53.+ jni 1.0.0+ jni 1.0.1global_jni_env.cubuntu-24.04-arm 20260719.67.1.fvmrc3.44.81.0.1 added
global_jni_env.c, which passes ava_listwhere avoid *is expected. On x86_64va_listis an array type that decays to a pointer, so it compiles; on aarch64 it's a struct, so it's a hard error. That's why only the ARM64 jobs fail — Android, Linux AMD64, Windows and the Apple jobs all pass.Reported upstream: dart-lang/native#3498.
Why it surfaced on a release PR
The examples depend on the serious_python packages by path. Bumping their version invalidates the committed
pubspec.lock, so pub re-resolves the whole graph and takes the newest transitive versions — picking upjni1.0.1. Any PR touching package versions after Jul 27 01:10Z would have hit this, and every future release PR will until it's pinned.jniitself arrives viapath_provider→path_provider_android→jni_flutter→jni.The fix
jni_flutter1.0.1 declaresjni: ^1.0.0, so 1.0.0 satisfies it — this narrows within the allowed range rather than overriding a real constraint.Applied to all three examples. Only
bridge_exampleruns in CI, but the other two break identically for anyone building them on an ARM64 Linux host. Verified each resolves tojni 1.0.0afterflutter pub get.The
flask_example/run_examplelocks also pick up the current path-dependency version (4.0.0→4.4.1) — they were simply stale.Drop the override once a fixed
jniships.Note for #242
That PR branched from the same commit, so it needs
mainmerged in after this lands to go green.This does not protect Flet users
packages/fletdepends onpath_provider: ^2.1.5, so a Flet app pullsjnithrough the same chain — and a generated Flet project has no committed lock, so it always resolves the newest.flet build linuxon an ARM64 host will hit this. Fixing that needs a separate pin on the flet side, or the upstream fix.